package ge.telasi.tasks.ui.search;

import ge.telasi.tasks.search.Condition;
import javax.swing.Icon;

/**
 * @author dimitri
 */
public abstract class Field {
    private static int field_id = 0;

    private String name;
    private String humanName;

    public Field(String name, String humanName) {
        this.name = name;
        this.humanName = humanName;
    }

    public String getName() {
        return name;
    }

    public String getSysName() {
        return "${" + name + "}";
    }

    public String getHumanName() {
        return humanName;
    }

    public String getNextField() {
        int id = field_id;
        field_id++;
        return "field_" + id;
    }

    public abstract String getType();

    public abstract Icon getIcon();

    public abstract Condition getCondition();

    @Override
    public String toString() {
        return humanName;
    }

}
